package com.scw.service.serviceImp;

import java.util.List;

import org.springframework.stereotype.Component;

import com.scw.dao.TipDao;
import com.scw.model.Tip;
import com.scw.service.TipService;
@Component("tipService")
public class TipServiceImpl implements TipService {
	private TipDao tipDao;

	public void delete(Tip tip) {
		tipDao.delete(tip);
	}

	public List<Tip> findAll() {
		return tipDao.findAll();
	}

	public List<Tip> findByUserId(Long userId) {
		return tipDao.findByUserId(userId);
	}

	public Tip get(Long id) {
		return tipDao.get(id);
	}

	public Tip get(Tip tip) {
		return tipDao.get(tip);
	}

	public Tip save(Tip tip) {
		return tipDao.save(tip);
	}

	public void update(Tip tip) {
		tipDao.update(tip);
	}

	public TipDao getTipDao() {
		return tipDao;
	}

	public void setTipDao(TipDao tipDao) {
		this.tipDao = tipDao;
	}

}
